package com.gy.ai.agent.platform.siliconflow.entity;

import com.gy.ai.agent.core.BaseResponse;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * @author LGY
 * Create by 2025/6/16 16:22
 */
@Data
@Accessors(chain = true)
public class SiliconflowChatResp extends BaseResponse implements Serializable {

    private String id;

    private String object;

    private Long created;

    private String model;

    private List<Chioces> choices;

    private String system_fingerprint;

    private Usage usage;

    @Data
    public static class Chioces implements Serializable {

        private Integer index;

        /**
         * 流式返回结果承载
         */
        private Delta delta;
        /**
         * 非流式返回结果承载
         */
        private Delta message;
    }

    @Data
    public static class Delta implements Serializable {

        private String content;

        private String reasoning_content;

        private String role;
    }

    @Data
    public static class Usage implements Serializable {

        private Long prompt_tokens;

        private Long completion_tokens;

        private Long total_tokens;

        private completionTokensDetails completion_tokens_details;
    }

    @Data
    public static class completionTokensDetails implements Serializable {
        private Long reasoning_tokens;
    }
}
